package com.holdtime.jtt809.taxi.module.entity.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.holdtime.jtt809.taxi.module.entity.PlatformInfoDO;
import com.holdtime.jtt809.taxi.module.model.vo.PlatformInfoPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 下级平台信息 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface PlatformInfoMapper extends BaseMapperX<PlatformInfoDO> {

    default PageResult<PlatformInfoDO> selectPage(PlatformInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PlatformInfoDO>()
                .likeIfPresent(PlatformInfoDO::getPfName, reqVO.getPfName())
                .eqIfPresent(PlatformInfoDO::getPfGnsscenterid, reqVO.getPfGnsscenterid())
                .eqIfPresent(PlatformInfoDO::getUserid, reqVO.getUserid())
                .eqIfPresent(PlatformInfoDO::getPassword, reqVO.getPassword())
                .eqIfPresent(PlatformInfoDO::getLinkIp, reqVO.getLinkIp())
                .betweenIfPresent(PlatformInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PlatformInfoDO::getId));
    }

}